/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, rgba(227, 242, 253, 0.8) 0%, rgba(187, 222, 251, 0.8) 100%), url('../assets/风光.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.8) 0%, rgba(66, 165, 245, 0.8) 100%), url('../assets/湛蓝海景.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 4rem 0;
    text-align: center;
    box-shadow: 0 4px 20px rgba(25, 118, 210, 0.3);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(25, 118, 210, 0.3);
    z-index: 1;
}

.header .container {
    position: relative;
    z-index: 2;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 导航栏 */
.nav {
    background: linear-gradient(rgba(25, 118, 210, 0.9), rgba(25, 118, 210, 0.9)), url('../assets/大门.jpg');
    background-size: cover;
    background-position: center;
    padding: 0.6rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-shrink: 0;
}

.nav-title {
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.3rem;
    margin: 0;
    padding: 0;
    flex: 1;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    font-size: 0.9rem;
}

.nav-menu a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.nav-menu a.active {
    background: rgba(255,255,255,0.2);
}

/* 主要内容区域 */
.main-content {
    padding: 2rem 0;
}

.section {
    background: rgba(255, 255, 255, 0.95);
    margin: 2rem 0;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(25, 118, 210, 0.1);
    border: 1px solid rgba(25, 118, 210, 0.1);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    position: relative;
    overflow: hidden;
}

/* 为不同section添加背景图片 */
#scenery {
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url('../assets/沙滩.jpg');
    background-size: cover;
    background-position: center;
}

#culture {
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url('../assets/石碑.jpg');
    background-size: cover;
    background-position: center;
}

#activities {
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url('../assets/海滨.jpg');
    background-size: cover;
    background-position: center;
}

#tickets {
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url('../assets/码头.jpg');
    background-size: cover;
    background-position: center;
}

#transport {
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url('../assets/夏季码头.jpg');
    background-size: cover;
    background-position: center;
}

#routes {
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url('../assets/后山环岛路.jpg');
    background-size: cover;
    background-position: center;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section h2 {
    color: #1976d2;
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #1976d2, #42a5f5);
    border-radius: 2px;
}

/* 图片画廊 */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    min-height: 200px;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-placeholder {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-direction: column;
    gap: 0.5rem;
}

.gallery-placeholder i {
    font-size: 3rem;
}

.gallery-item .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 1rem;
    text-align: center;
}

/* 信息卡片 */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.info-card {
    background: linear-gradient(135deg, rgba(227, 242, 253, 0.9) 0%, rgba(243, 229, 245, 0.9) 100%);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    border: 2px solid rgba(25, 118, 210, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../assets/风景.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: -1;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(25, 118, 210, 0.2);
}

.info-card h3 {
    color: #1976d2;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.info-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #1976d2;
}

.info-card .price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e91e63;
    margin: 0.5rem 0;
}

/* 路线时间轴 */
.timeline {
    position: relative;
    margin: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #1976d2, #42a5f5);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin: 2rem 0;
    width: 45%;
}

.timeline-item:nth-child(odd) {
    margin-left: 0;
}

.timeline-item:nth-child(even) {
    margin-left: 55%;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.1);
    border: 2px solid rgba(25, 118, 210, 0.1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../assets/风光.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.05;
    z-index: -1;
}

.timeline-content h3 {
    color: #1976d2;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 20px;
    width: 15px;
    height: 15px;
    background: #1976d2;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 3px #1976d2;
}

.timeline-item:nth-child(odd)::before {
    right: -32px;
}

.timeline-item:nth-child(even)::before {
    left: -32px;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
    color: white;
    padding: 0.8rem 2rem;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(25, 118, 210, 0.3);
}

/* 页脚 */
.footer {
    background: linear-gradient(rgba(25, 118, 210, 0.9), rgba(25, 118, 210, 0.9)), url('../assets/黄昏码头.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 3rem 0;
    margin-top: 3rem;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(25, 118, 210, 0.3);
    z-index: 1;
}

.footer .container {
    position: relative;
    z-index: 2;
}

/* 特殊布局样式 */
.culture-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.culture-features {
    background: linear-gradient(135deg, #e1f5fe, #f3e5f5);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
}

.culture-features .icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #1976d2;
}

.culture-features h4 {
    color: #1976d2;
    margin-bottom: 1rem;
}

.culture-features ul {
    text-align: left;
    color: #666;
    list-style: none;
}

.culture-features li {
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.transport-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.transport-card {
    padding: 1.5rem;
    border-radius: 10px;
}

.transport-card.ferry {
    background: linear-gradient(135deg, #e8f5e8, #f1f8e9);
}

.transport-card.bus {
    background: linear-gradient(135deg, #fff3e0, #fce4ec);
}

.transport-card.land {
    background: linear-gradient(135deg, #e1f5fe, #e8eaf6);
}

.transport-card h3 {
    color: #1976d2;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ticket-info {
    background: #e3f2fd;
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 2rem;
    text-align: center;
}

.ticket-info h4 {
    color: #1976d2;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.ticket-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    text-align: left;
}

.tips-section {
    background: #e3f2fd;
    padding: 2rem;
    border-radius: 10px;
    margin-top: 2rem;
}

.tips-section h3 {
    color: #1976d2;
    text-align: center;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.tips-grid h4 {
    color: #1976d2;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.tips-grid ul {
    list-style: none;
}

.tips-grid li {
    margin: 0.3rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Font Awesome 图标样式 */
.fas, .far, .fab {
    margin-right: 0.5rem;
    color: inherit;
}

.nav .fas {
    margin-right: 0.3rem;
    font-size: 0.9rem;
}

.section h2 .fas {
    margin-right: 0.5rem;
    color: #1976d2;
}

.info-card .fas {
    color: #1976d2;
    margin-right: 0;
}

/* 列表样式统一 */
ul {
    list-style: none;
    padding-left: 0;
}

ul li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #1976d2;
    font-weight: bold;
    font-size: 1.1rem;
}

/* 信息卡片内的列表样式 */
.info-card ul {
    text-align: left;
    margin-top: 1rem;
}

.info-card ul li {
    color: #666;
    font-size: 0.9rem;
}

/* 贴心提醒部分的列表样式 */
.section ul li {
    color: #555;
    font-size: 0.95rem;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .section {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .info-cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header {
        padding: 1.5rem 0;
    }
    
    .header h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .nav {
        padding: 0.5rem 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(25, 118, 210, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu li {
        margin: 0.5rem 0;
        width: 100%;
        text-align: center;
    }
    
    .nav-menu a {
        padding: 1rem 2rem;
        font-size: 1.1rem;
        width: 100%;
        justify-content: center;
        border-radius: 0;
    }
    
    .nav-menu a:hover {
        background: rgba(255,255,255,0.3);
        transform: none;
    }
    
    .section {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .section h2 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .gallery {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .info-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .culture-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .transport-grid {
        grid-template-columns: 1fr;
    }
    
    .ticket-grid {
        grid-template-columns: 1fr;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        width: calc(100% - 40px);
        margin-left: 40px !important;
    }
    
    .timeline-item::before {
        left: -32px !important;
    }
    
    .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .header {
        padding: 1.5rem 0;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .section {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .section h2 {
        font-size: 1.3rem;
    }
    
    .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .info-card {
        padding: 1rem;
    }
    
    .timeline-content {
        padding: 1rem;
    }
    
    .culture-features {
        padding: 1.5rem;
    }
    
    .transport-card {
        padding: 1rem;
    }
    
    .tips-section {
        padding: 1.5rem;
    }
    
    .nav a {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .nav .fas {
        font-size: 0.8rem;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

/* 加载状态 */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* 无障碍访问 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .section {
        border: 2px solid #1976d2;
    }
    
    .info-card {
        border: 2px solid #1976d2;
    }
    
    .timeline-content {
        border: 2px solid #1976d2;
    }
}

/* 打印样式 */
@media print {
    .nav,
    .btn,
    .footer {
        display: none;
    }
    
    .section {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
    
    .header {
        background: none;
        color: black;
        box-shadow: none;
    }
    
    body {
        background: white;
    }
}